﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user_edit.aspx.cs" Inherits="EDP.Application.Web.User.user_edit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel_main" runat="server" />
        <f:HiddenField ID="hide_DepartmentId" runat="server" BindName="DepartmentId" />
        <f:HiddenField ID="hide_RoleIdList" runat="server" />
        <f:Panel ID="panel_main" Margin="0" BodyPadding="0" runat="server" ShowBorder="false" ShowHeader="false" AutoScroll="true" Layout="Region">
            <Items>
                <f:SimpleForm ID="form_content" runat="server" ShowBorder="false" ShowHeader="false" BodyPadding="10" Margin="0" LabelAlign="Right" LabelWidth="60" RegionPosition="Left" Width="320" Layout="Column">
                    <Items>
                        <f:TextBox ID="tb_Account" runat="server" Label="账号" BindName="Account" Margin="0" ColumnWidth="100%" ShowRedStar="true"
                            Regex="^[A-Za-z0-9]{4,10}$" RegexMessage="4-10位字母或数字" EmptyText="4-10位字母或数字" />
                        <f:TextBox ID="tb_Name" runat="server" Label="姓名" BindName="Name" Margin="10 0 0 0" ColumnWidth="100%" ShowRedStar="true" />
                        <f:RadioButtonList ID="rbl_Gender" runat="server" Label="性别" BindName="GenderId" Margin="10 0 0 0" ColumnWidth="80%" ShowRedStar="true" />
                        <f:TextBox ID="tb_Mobile" runat="server" Label="手机号" BindName="Mobile" Margin="10 0 0 0" ColumnWidth="100%"
                            Regex="^[1]([3-9])[0-9]{9}$" RegexMessage="手机号格式错误" />
                        <f:TextBox ID="tb_Email" runat="server" Label="邮箱" BindName="Email" Margin="10 0 0 0" ColumnWidth="100%"
                            Regex="^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$" RegexMessage="邮箱格式错误" />
                        <f:TriggerBox ID="trb_DepartmenName" runat="server" Label="部门" BindName="DepartmenName" Margin="10 0 0 0" ColumnWidth="100%"
                            EnableEdit="false" TriggerIcon="Search" AutoPostBack="true" OnTextChanged="trb_DepartmenName_TextChanged" ShowRedStar="true" />
                        <f:DropDownList ID="ddl_position" runat="server" Label="职位" BindName="PositionId" Margin="10 0 0 0" ColumnWidth="70%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_position_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_grade" runat="server" BindName="PositionTypeGradeId" Margin="10 0 0 5" ColumnWidth="30%" />

                        <f:TextBox ID="tb_createUser" runat="server" Label="创建人" BindName="CreateUserName" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_craeteTime" runat="server" Label="创建时间" BindName="CreateTimeDisplay" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_modifyUser" runat="server" Label="修改人" BindName="ModifyUserName" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_modifyTime" runat="server" Label="修改时间" BindName="ModifyTimeDisplay" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextArea ID="tb_remark" runat="server" Label="描述" BindName="Remarks" Margin="10 0 0 0" ColumnWidth="100%" Height="129" />
                    </Items>
                </f:SimpleForm>
                <f:Grid ID="grid_position" runat="server" Margin="10 5 0 0" DataKeyNames="ID,IsMain" RegionPosition="Center" AllowPaging="false"
                    OnRowCommand="grid_List_RowCommand" OnPreRowDataBound="grid_List_PreRowDataBound" EnableCheckBoxSelect="false"
                    AllowSorting="true" SortField="IsMain" SortDirection="DESC" OnSort="grid_List_Sort">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right">
                            <Items>
                                <f:Label ID="lb_position" runat="server" Text="任职信息" CssStyle="color:#666" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_position_add" runat="server" Text="新增兼职" Icon="Add" Margin="0 10 0 0" EnablePostBack="false" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="OrganizationName" DataToolTipField="OrganizationName" ExpandUnusedSpace="true" HeaderText="机构" />
                        <f:BoundField DataField="DepartmentNumbers" DataToolTipField="DepartmentNumbers" Width="120" HeaderText="部门编号" />
                        <f:BoundField DataField="DepartmentName" DataToolTipField="DepartmentName" ExpandUnusedSpace="true" HeaderText="部门" />
                        <f:BoundField DataField="PositionName" DataToolTipField="PositionName" Width="100" HeaderText="职务" />
                        <f:BoundField DataField="PositionTitle" DataToolTipField="PositionTitle" Width="120" HeaderText="职位" />
                        <f:BoundField DataField="PositionGradeName" SortField="PositionGradeLevels" Width="65" HeaderText="职级" />
                        <f:CheckBoxField DataField="IsMain" HeaderText="主职" Width="65" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" EnableLock="true" ToolTip="删除" CommandTitle="删除职位" Icon="Delete" ConfirmTitle="删除职位" ConfirmText="是否删除该职位？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
                <f:Grid ID="grid_role" runat="server" Margin="10 5 0 0" DataKeyNames="ID" Width="300" RegionPosition="Right" AllowPaging="false" EnableCheckBoxSelect="false"
                    OnRowCommand="grid_role_RowCommand" OnPreRowDataBound="grid_role_PreRowDataBound"
                    AllowSorting="true" SortField="Numbers" SortDirection="ASC" OnSort="grid_role_Sort">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right">
                            <Items>
                                <f:Label ID="lb_role" runat="server" Text="所属角色" CssStyle="color:#666" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_more" runat="server" EnablePermission="false" Text="角色操作" EnablePostBack="false">
                                    <Menu runat="server" Margin="0">
                                        <f:MenuButton ID="btn_addRole" runat="server" Text="添加角色" Margin="0" EnablePostBack="false" />
                                        <f:MenuButton ID="btn_setRole" runat="server" Text="设置角色" Margin="0" EnablePostBack="false" />
                                        <f:MenuButton ID="btn_clearRole" runat="server" Margin="0" Text="清空角色" OnClick="btn_clearRole_Click" />
                                    </Menu>
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="RoleNumbers" Width="100" HeaderText="角色编号" />
                        <f:BoundField DataField="RoleName" DataToolTipField="Name" ExpandUnusedSpace="true" HeaderText="角色名称" />
                        <f:LinkButtonField ColumnID="lb_role_delete" Width="30" CommandName="delete" EnableLock="true" ToolTip="删除" CommandTitle="删除职位" Icon="Delete" ConfirmTitle="删除职位" ConfirmText="是否删除该职位？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
            <Toolbars>
                <f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
                    <Items>
                        <f:Button ID="btn_resetPassword" runat="server" Text="重置密码" Icon="ArrowRotateAnticlockwise" Margin="0 10 0 0" ConfirmTitle="重置密码" ConfirmText="是否重置该用户密码？" ConfirmTarget="Self" ConfirmIcon="Question" OnClick="btn_resetPassword_Click" />
                        <f:Button ID="btn_save" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 0 0" OnClick="btn_save_Click" />
                        <f:Button ID="btn_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" EnablePostBack="false" EnablePermission="false" />
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
        <f:Window ID="win_dept" runat="server" Target="Parent" />
        <f:Window ID="win_posi" runat="server" Target="Parent" EnableIFrame="true" Width="650" Height="345" Title="新增兼职" OnClose="win_posi_Close" />
        <f:Window ID="win_setRole" runat="server" Target="Parent" MaxHeight="900" OnClose="win_setRole_Close" />
        <f:Window ID="win_addRole" runat="server" Target="Parent" MaxHeight="900" OnClose="win_addRole_Close" />
    </form>
</body>
</html>
